<%@ page language="java" pageEncoding="UTF-8"%>
<script type="text/javascript" src="http://www.ijiutian.com/js/check4loginregister.js"></script>
<style>
input.text { margin-bottom:12px; width:95%; padding: .4em; }
fieldset { padding:0; border:0; margin-top:25px; }
h1 { font-size: 1.2em; margin: .6em 0; }
div#users-contain { width: 350px; margin: 20px 0; }
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
.ui-dialog .ui-state-error { padding: .3em; }
.validateTips { border: 1px solid transparent; padding: 0.3em; }
.loginbackground{background: url("images/ui-bg_flat_75_ffffff_40x100.png") repeat-x scroll 0 0 #EEEEEE;}
</style>
<script>
$(function() {
$( "#dialog:ui-dialog" ).dialog( "destroy" );
var name = $( "#a" ),
password = $( "#b" ),
allFields = $( [] ).add( name ).add( password ),
tips = $( ".validateTips" );
checklogin=function(){
var bValid = true;
allFields.removeClass( "ui-state-error" );
bValid = bValid && checkLength( $("#a"), "账号", 3, 16 ,tips);
bValid = bValid && checkLength( $("#b"), "密码", 5, 16 ,tips);
bValid = bValid && checkRegexp( $("#a"), /^[a-z]([0-9a-z_])+$/i, "用户名由a-z, 0-9, 下划线, 组成, 以字母开头" ,tips);
bValid = bValid && checkRegexp( $("#b"), /^([0-9a-zA-Z])+$/, "密码只能包含a-z, 0-9" ,tips);
if ( bValid ) {$("#userform").submit();}
}
$( "#dialog-form" ).dialog({
autoOpen: false,
height: 300,
width: 350,
modal: true,
buttons: {"登录": function() {checklogin();},"取消": function() {$( this ).dialog( "close" );}},
close: function() {allFields.val( "" ).removeClass( "ui-state-error" );}
});
$("#gologin").click(function(){
$( "#dialog-form" ).dialog( "open" );
})
$("#myaccount").click(function(){
$.post('http://www.ijiutian.com/hotel/myAccount.do?time='+new Date().getTime(), {
}, function(data) {
if(data=='notlog') 
$( "#dialog-form" ).dialog( "open" );
else if(data=='err')
alert("出错");
else
document.location.href=data;}
, 'text');
})
$("body").bind('keydown',function(event) {
if(event.keyCode==13){
var opened = $( "#dialog-form" ).dialog( "isOpen" );
if(opened)
checklogin();
}
});
});
	</script>
	<div id="w_header"><div class="ban" id="elong_header_banner"></div> <div style="clear:both;"></div>	<ul id="w_nav">		<li><a href="http://www.ijiutian.com/" id="nav_home"><span>首页</span></a></li>		<li><a href="/yudingliucheng.jsp" id="nav_hotels"><span>预订流程</span></a></li>		<li><a href="http://www.ijiutian.com/about.jsp" id="nav_dianping"><span>关于我们</span></a></li>	<!-- <li><a href="http://www.ijiutian.com/jiutian/notyet.html" id="nav_hotelsh"><span>团购</span></a></li> -->		</ul> <div style="clear:both;"></div></div>
	<div id="loginmenu">
	<div id="w_sec_nav_k">
		<ul id="w_sec_nav" class="clx">
			<li class="w_tel">24小时酒店预订电话:15801300677 18911585580</li>
			<li class="w_func">[<a href="javascript:void(0)" id="gologin" class="link">登录</a>|<a href="http://www.ijiutian.com/login/register.jsp" class="link">注册</a>] 
			<a id="myaccount" href="javascript:void(0)">我的帐户</a>|<a href="http://www.ijiutian.com/help.jsp" style="color: rgb(222, 49, 1);">帮助中心</a></li>
		</ul>
	<div id="dec_line"></div>
    </div></div>
    <div class="clear"> </div>
<div id="dialog-form" title="登录" class="loginbackground" style="display:none">
	<p class="validateTips">请输入账号和密码。</p>
	<form id="userform" name="userform" action="/login.do" method="post">
	<fieldset>
		<label style="display:block;text-align:left" for="name">账号</label>
		<input type="text" name="a" id="a" class="text ui-widget-content ui-corner-all" />
		<label style="display:block;text-align:left" for="password">密码</label>
		<input type="password" name="b" id="b" value="" class="text ui-widget-content ui-corner-all" />
	</fieldset>
	</form>
</div>


    